import yaml

from autoTest_brtcApi.utils.get_path import get_yaml_path

def write_yaml(filename,content):
    with open (get_yaml_path(filename),"w",encoding='utf-8') as f:
        # 将数据写入yaml
        yaml.safe_dump(content,f,default_flow_style=False,allow_unicode=True)

if __name__ == "__main__":
    content = {"userId":"1234568505",
               "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N"}
    write_yaml('tmp.yaml',content)
